class chongwu:

    def __init__(self,name,age):
        self.name = name
        self.age = age
        self.__serect = '秘密'
    def eat(self,food):
        print('{}吃{}'.format(self.name,food))

    def __fun1(self):
        print(self.__serect)

cat = chongwu('猫',6)
cat.eat('饼干')


class Student(chongwu):
# class  子类(父类)
    pass

s1 = Student('猫',16)
print(s1)

print(s1.name)
print(s1.age)
s1.eat('鱼')
print(s1.__dict__)
print(s1._chongwu__serect)
s1._chongwu__fun1()